package com.coffee.order.service.sku.dao;

import com.coffee.order.api.sku.query.SkuOrderDetailQuery;
import com.coffee.order.service.sku.bean.SkuOrder;
import com.coffee.order.service.sku.bean.SkuOrderDetail;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SkuOrderDetailDao {
    public SkuOrderDetail findById(Integer id);

    public SkuOrderDetail findByIdAndMerchantId(@Param("id") Integer id, @Param("merchantId") Integer merchantId);

    public SkuOrderDetail findByIdForUpdate(Integer id);

    public List<SkuOrderDetail> findByIds(@Param("idList") List<Integer> idList);

    public Integer count(@Param("param") SkuOrderDetailQuery param);

    public List<SkuOrderDetail> page(@Param("param") SkuOrderDetailQuery param, @Param("offset") Integer offset, @Param("rows") Integer rows);

    public List<SkuOrderDetail> list(@Param("param") SkuOrderDetailQuery param);

    public SkuOrderDetail findFirst(@Param("param") SkuOrderDetailQuery param);

    public Integer insert(SkuOrderDetail param);

    Integer insertBatch(List<SkuOrderDetail> list);

    public void updateById(@Param("param") SkuOrderDetail param);

    public void updateBySkuOrderId(@Param("param") SkuOrderDetail param);

    public Integer deleteById(Integer id);

    public Integer deleteByIds(List<Integer> idList);

    public Double getPayPrice(@Param("orderId") Integer orderId, @Param("skuSalesInformationId") Integer skuSalesInformationId);

    public void updateModifyPriceById(@Param("param") SkuOrderDetail param);

}